package com.example.kehoobackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.kehoobackend.common.CommonResponse;
import com.example.kehoobackend.domain.User;

import java.util.List;
import java.util.Map;

public interface UserService extends IService<User> {
    CommonResponse<Map> login(String username, String password);

    boolean register(User user,String token, String code);

    boolean usernameIsExist(String username);

    boolean emailIsExist(String email);

    boolean changePassword(Integer user_id,String password);

    boolean changeEmail(Integer user_id,String email,String token,String code);


    boolean deleteUser(Integer user_id);

    CommonResponse<List<User>> recommendUser(Integer user_id);

    CommonResponse<User> getUserInfo(Integer user_id);

    boolean logout(Integer user_id);

    boolean changePasswordByEmail(Integer userId, String password, String email, String token, String code);

    CommonResponse<Map> faceLogin(Integer user_id);

    CommonResponse<List<User>> searchUser(String keyword,Integer user_id);

    User getUserByUsername(String username);


    CommonResponse<List<User>> getAllUserInfo();

    CommonResponse<List<User>> filterUser(Integer type, String value);

    boolean resetUserPassword(Integer user_id);


    boolean verifyPassword(int user_id, String password);

    boolean updateUserInfo(User user);
}
